package com.lecture.java8.list;

import org.apache.commons.collections4.ListUtils;

import java.util.ArrayList;
import java.util.List;
import java.util.TreeSet;

import static java.util.Comparator.comparing;
import static java.util.stream.Collectors.collectingAndThen;
import static java.util.stream.Collectors.toCollection;

/**
 * @author luyn
 * @version 1.0
 * @description
 * @date 2021/2/25 18:59
 */
public class ListEqual {

    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        List<String> list1 = new ArrayList<>();

        //集合比较
        ListUtils.isEqualList(list1, list);

        System.out.println(Math.round(0.7));
        System.out.println(Math.round(-11.8));
        Integer i1 = 100;
        Integer i2 = 100;

        Integer i3 = 1918;
        Integer i4 = 1918;

        System.out.println(i1 == i2);
        System.out.println(i3.intValue() == i4.intValue());

       // list.stream().collect(collectingAndThen(toCollection(() -> new TreeSet<>(comparing(n->n.getBytes()))),ArrayList::new))
    }
}
